﻿using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace RSM.Business
{
    [ToolboxData("<{0}:ExtendedLabelControl runat=server></{0}:ExtendedLabelControl>")]

    public class PageLayoutName : WebControl
    {
        Label lblTitle = new Label();
        TextBox txtPageLayout = new TextBox();
        
       
        //private string title;
        public override bool Visible
        {
            set
            {
                lblTitle.Visible = value;
                txtPageLayout.Visible = value;
            }
        }
        public string Title
        {
            get { return lblTitle.Text; }
            set { lblTitle.Text = value; }
        }
        //private string pagelayoutName;

        public string PagelayoutText
        {
            get { return txtPageLayout.Text ; }
            set { txtPageLayout.Text = value; }
        }

       public PageLayoutName()
        {
          
            this.Controls.Add(lblTitle);
            this.Controls.Add(txtPageLayout);
        }
        protected override void OnLoad(System.EventArgs e)
        {
           base.OnLoad(e);
           
        }
        public override void RenderControl(HtmlTextWriter writer)
        {
            writer.Write("<table>");
            writer.Write("<tr>");
            writer.Write("<td>");
            lblTitle.RenderControl(writer);
            writer.Write("</td>");
            writer.Write("</tr>");

            writer.Write("<tr>");
            writer.Write("<td>");
            txtPageLayout.RenderControl(writer);
            writer.Write("</td>");
            writer.Write("</tr>");
            writer.Write("</table>");
         
            //base.RenderControl(writer);
        }


    }
}
